<template>
  <div class="home-title">
    <div class="left">
      <div class="dot" />
      <div class="title">{{ title }}</div>
    </div>
    <div class="right more" @click="$emit('jumpMore')">
      <template v-if="showMore">
        <span>查看更多</span>
        <uni-icons
          type="gengduo"
          custom-prefix="iconfont"
          color="#666"
          :size="12"
        />
      </template>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, computed, toRaw } from 'vue';

defineProps({
  showMore: {
    type: Boolean,
    default: false
  },
  title: {
    type: String,
    default: ''
  }
})
</script>

<style lang="scss">
.home-title {
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .left {
    display: flex;
    flex: 1;
    align-items: center;
  }
  .dot {
    width: 4px;
    height: 10px;
    background: #46BAD1;
    margin-right: 4px;
  }
  .title {
    font-weight: bold;
    font-size: 16px;
    color: #111;
  }
  .more {
    font-size: 12px;
    color: #666;
  }
}
</style>
